<?php
class Service extends AppModel {
	var $name = 'Service';
	var $displayField = 'name';
	var $actsAs = array('Uploader.FileValidation','Searchable.Searchable');
	var $validate = array(
		'title' => array(
			'notempty' => array(
				'rule' => array('notempty'),
				'message' => 'Tiêu đề không thể để trống.',
				'allowEmpty' => false,
				'required' => true,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
		'cateservices_id' => array(
			'numeric' => array(
				'rule' => array('numeric'),
				'message' => 'Please enter your items!',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
 	);
	var $belongsTo = array(
		'Cateservice' => array(
			'className' => 'Cateservice',
			'foreignKey' => 'cateservices_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);
 }
?>
